# $Id$
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: Miguel Revilla <yo at miguelrevilla.com>
# Contributor: David Sotelo <dvsotelo at gmail.com>
# Contributor: Nuno Araujo <nuno.araujo@russo79.com>

pkgname=qpdf
pkgver=7.0.0
pkgrel=1
pkgdesc="QPDF: A Content-Preserving PDF Transformation System"
arch=('i686' 'x86_64')
url="https://qpdf.sourceforge.net/"
license=('custom:Artistic-2.0' 'Apache')
depends=('openjpeg2' 'perl')
source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz)
sha1sums=('506002271a7e04f431014baa94dd820c47235356')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --disable-static
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make check # passes all
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}/" install

  mkdir -m755 -p ${pkgdir}/usr/share/licenses/${pkgname}
  install -m644 {Artistic-2.0,LICENSE.txt} ${pkgdir}/usr/share/licenses/${pkgname}/
}
